﻿//https://leetcode.cn/problems/di-yi-ge-zhi-chu-xian-yi-ci-de-zi-fu-lcof/?envType=problem-list-v2&envId=queue&difficulty=EASY

class Solution {
public:
    char dismantlingAction(string arr)
    {
        int hash[26] = { 0 };
        for (auto& e : arr)
        {
            hash[e - 'a']++;
        }
        for (auto& e : arr)
        {
            if (hash[e - 'a'] == 1)
            {
                return e;
            }
        }
        return ' ';
    }
};